<template>
  <mavon-editor
    class="md"
    :value="webDataString"
    :subfield="false"
    :defaultOpen="'preview'"
    :toolbarsFlag="false"
    :editable="false"
    :scrollStyle="true"
    :ishljs="true"
    :html="true"
    :xssOptions="{
                whiteList: {
                    iframe: ['src', 'height', 'width', 'scrolling','allowfullscreen','frameborder'],
                    div: ['style', 'height', 'width', 'align'],
                    img: ['src', 'height', 'width','style', 'align']
                  }
              }"
  />
<!--  仅用作展示可以设置props:
toolbarsFlag: false ,
subfield: false,
defaultOpen: "preview"
whiteList: 关于mavon-editor中iframe 的使用 和插入视频、音频的记录  https://blog.csdn.net/levi2469/article/details/122550131

-->
</template>

<script>
import {homeGet} from "@/api/home";

export default {
  data() {
    return{
      webDataString: ''
    }
  },
  created() {
    homeGet("1").then(
      res=>{
        this.webDataString = res.data.homeHtml
      }
    )

  }
};
</script>
